// 基于template/src/widgets/\{{appEntities}}/\{{ctrls@WIZARDPANEL}}-wizard-panel/\{{spinalCase ctrl.codeName}}-wizard-panel-model.ts.hbs生成
import { IWizardPanelModel } from '@/core';
function getModel(): IWizardPanelModel {
    return {
        name: "{{ctrl.name}}",
        caption: "{{ctrl.caption}}",
        codeName: "{{ctrl.codeName}}",
        entityCodeName: "{{ctrl.psAppDataEntity.codeName}}",
        keyPSAppDEField: "{{ctrl.psAppDataEntity.keyPSAppDEField.codeName}}",
        majorPSAppDEField: "{{ctrl.psAppDataEntity.majorPSAppDEField.codeName}}",
        cssName: "{{#if ctrl.psSysCss}}{{ctrl.psSysCss.cssName}}{{/if}}",
        controlType: "{{ctrl.controlType}}",
        showStepBar: {{ctrl.showStepBar}},
        {{#if ctrl.statePSAppDEField}}
        stateField: "{{ctrl.statePSAppDEField.codeName}}",
        {{/if}}
        isStateWizard: {{#if ctrl.psDEWizard.stateWizard}}true{{else}}false{{/if}},
        initAction: {{#if ctrl.initPSControlAction.psAppDEMethod}}"{{ctrl.initPSControlAction.psAppDEMethod.codeName}}"{{else}}"Get"{{/if}},
        finishAction: {{#if ctrl.finishPSControlAction.psAppDEMethod}}"{{ctrl.finishPSControlAction.psAppDEMethod.codeName}}"{{else}}"Update"{{/if}},
        {{#if ctrl.psDEWizard}}
        buttonCaption: {
            finishCaption: "{{ctrl.psDEWizard.finishCaption}}",
            nextCaption: "{{ctrl.psDEWizard.nextCaption}}",
            prevCaption: "{{ctrl.psDEWizard.prevCaption}}",
            {{#if ctrl.psDEWizard.prevCapPSLanguageRes}}
            prevLanResTag: "{{ctrl.psDEWizard.prevCapPSLanguageRes.lanResTag}}",
            {{/if}}
            {{#if ctrl.psDEWizard.nextCapPSLanguageRes}}
            nextLanResTag: "{{ctrl.psDEWizard.nextCapPSLanguageRes.lanResTag}}",
            {{/if}}
            {{#if ctrl.psDEWizard.finishCapPSLanguageRes}}
            finishLanResTag: "{{ctrl.psDEWizard.finishCapPSLanguageRes.lanResTag}}",
            {{/if}}
        },
        steps: [
        {{#if ctrl.psDEWizard.psDEWizardSteps}}
        {{#each ctrl.psDEWizard.psDEWizardSteps as | step |}}
            {
                lanResTag: "{{#if step.titlePSLanguageRes}}{{step.titlePSLanguageRes.lanResTag}}{{/if}}",
                title: "{{step.title}}",
                stepTag: "{{step.stepTag}}",
                {{#if step.titlePSSysCss}}
                cssName: "{{step.titlePSSysCss.cssName}}",
                {{/if}}
                {{#if step.psSysImage}}
                icon: {
                    {{#if step.psSysImage.cssClass}}
                    iconClass: "{{step.psSysImage.cssClass}}",
                    {{/if}}
                    {{#if step.psSysImage.imagePath}}
                    imgPath: "{{step.psSysImage.imagePath}}",
                    {{/if}}
                }
                {{/if}}
            },
        {{/each}}
        {{/if}}
        ],
        wizardForm: [
            {{#if ctrl.psDEWizard.psDEWizardForms}}
            {{#each ctrl.psDEWizard.psDEWizardForms as | stepForm |}}
            {
                stepActions: [
                {{#if stepForm.stepActions}}
                {{#each stepForm.stepActions as | action |}}
                    "{{action}}",
                {{/each}}
                {{/if}}
                ],
                formTag: "{{stepForm.formTag}}",
                {{#if stepForm.psDEWizardStep}}
                stepTag: "{{stepForm.psDEWizardStep.stepTag}}",
                {{/if}}
                firstForm: {{stepForm.firstForm}},
                name: "{{stepForm.name}}"
            },
            {{/each}}
            {{/if}}
        ],
        {{/if}}
        editForm: [
            {{#if ctrl.psDEEditForms}}
            {{#each ctrl.psDEEditForms as | editForm |}}
            {
                codeName: "{{editForm.codeName}}",
                name: "{{editForm.name}}",
                actions: {
                    loadAction: "{{#and editForm.getPSControlAction}}{{editForm.getPSControlAction.actionName}}{{else}}Get{{/and}}",
                    preAction: "{{#and editForm.goBackPSControlAction}}{{editForm.goBackPSControlAction.actionName}}{{/and}}",
                    saveAction: "{{#and editForm.updatePSControlAction}}{{editForm.updatePSControlAction.actionName}}{{else}}Update{{/and}}",
                }
            },
            {{/each}}
            {{/if}}
        ]
    }
}
export const model = getModel();
